package com.ymh.spring.learn.web.initializer;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

import com.ymh.spring.learn.web.config.RootConfig;
import com.ymh.spring.learn.web.config.WebConfig;

public class SpittrWebAppInitializer extends
		AbstractAnnotationConfigDispatcherServletInitializer {

	/**
	 * 指定根配置类
	 */
	@Override
	protected Class<?>[] getRootConfigClasses() {
		return new Class<?>[] { RootConfig.class };
	}

	/**
	 * 指定Servlet的配置类
	 */
	@Override
	protected Class<?>[] getServletConfigClasses() {
		return new Class<?>[] { WebConfig.class };
	}

	/**
	 * 将DispatcherServlet映射到"/"
	 */
	@Override
	protected String[] getServletMappings() {
		return new String[] { "/" };
	}

}
